package com.petdrug.service;

import com.petdrug.entity.UserEntity;
import com.petdrug.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
@com.alibaba.dubbo.config.annotation.Service
public class UserServiceImpl implements IUserService {

    @Autowired
    UserRepository userRepository;


    @Override
    public boolean register(UserEntity userEntity) {
        return userRepository.save(userEntity) != null;
    }

    @Override
    public UserEntity login(String uname, String upass) {
        return userRepository.queryByUnameAndUpass(uname,upass);
    }

}
